package com.zhkj.shixi.tvfilemanager;

import android.app.Activity;
import android.os.Bundle;


import com.zhkj.shixi.tvfilemanager.Interface.IDynamicDeviceInsertReceiver;

import static com.zhkj.shixi.tvfilemanager.StaticClasses.*;


public class MainActivity extends Activity {
    private IDynamicDeviceInsertReceiver dynamicDeviceInsertReceiver = DynamicDeviceInsertReceiver.getInstance();


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_demo);

        staticReceiverAvailability=false;//关闭静态广播接收
        dynamicDeviceInsertReceiver.startListener(this);//启动动态广播接收
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        dynamicDeviceInsertReceiver.stopListener(this);
        staticReceiverAvailability=true;
    }
}
